//Visitor.h
#ifndef __VISITOR_H__
#define __VISITOR_H__

class ConcreteElementA;
class ConcreteElementB;
class Element;
class Visitor
{
public:
    virtual ~Visitor() = default;

    virtual void VisitConcreteElementA(Element* elm) = 0;
    virtual void VisitConcreteElementB(Element* elm) = 0;
protected:
    Visitor() = default;
private:
};

class ConcreteVisitorA:public Visitor
{
public:
    ConcreteVisitorA() = default;
    virtual ~ConcreteVisitorA() = default;

    virtual void VisitConcreteElementA(Element* elm);
    virtual void VisitConcreteElementB(Element* elm);
protected:
private:
};

class ConcreteVisitorB:public Visitor
{
public:
    ConcreteVisitorB() = default;
    virtual ~ConcreteVisitorB() = default;

    virtual void VisitConcreteElementA(Element* elm);
    virtual void VisitConcreteElementB(Element* elm);
protected:
private:
};

#endif //~__VISITOR_H__

